package org.budo.cmbc.direct.sdk.entity.ryb;

import org.budo.cmbc.direct.sdk.entity.AbstractCmbcDirectResponse;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 风评答案提交
 */
@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
public class MERiskResultCommitResponse extends AbstractCmbcDirectResponse {
    private static final long serialVersionUID = 1750079576707652555L;

    /**
     * 风评结果,0-通过；1-不通过
     */
    private String riskCheckResult;

    public MERiskResultCommitResponse(String channelJnlNo, String responseJson) {
        super(channelJnlNo, responseJson);

        JSONObject jsonObj = JSON.parseObject(responseJson);

        this.riskCheckResult = jsonObj.getString("RiskCheckResult");
    }
}
